Limit Linux-only code with Q_OS_LINUX
authorPino Toscano <toscano.pino@tiscali.it>
Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Mon, 23 Nov 2020 18:16:00 +0000 (18:16 +0000)
commit226b0b8a55f2359f9f0cbdd01f9e73e8df0f7653
tree1a705c167ff6c04d78ab689628cec9b4f42e06a2
parentfc048e5f27df69dcdeff7c2889b4e1a9bc74f0c7
Limit Linux-only code with Q_OS_LINUX

Forwarded: no
Last-Update: 2020-04-19

The QStorageInfo/QStorageIterator implementation used for Linux is used also
on Hurd, as it uses an interface provided by GNU libc.
QStorageIterator::device() tries to use PATH_MAX (unavailable on the Hurd)
to lookup a /dev/block/ path, which exists on Linux only; hence, perform that
check within a Q_OS_LINUX block.

Gbp-Pq: Name qstorageinfo_linux.diff
src/corelib/io/qstorageinfo_unix.cpp